﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyCode.Project.Domain.Businesses.Sms
{
    /// <summary>
    /// 短信发送结果
    /// </summary>
    public class SmsSendResult
    {
        /// <summary>
        /// 返回码。0:成功,-1:失败
        /// </summary>
        [JsonProperty("code")]
        public string Code { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        [JsonProperty("message")]
        public string Message { get; set; }

        /// <summary>
        /// 错误原因
        /// </summary>
        [JsonProperty("cause")]
        public string Cause { get; set; }

        /// <summary>
        /// 是否请求成功
        /// </summary>
        /// <returns></returns>
        public bool IsSuccess()
        {
            return Code == "0";
        }
    }

    //{"code":"107","msgId":"","time":"20230511160907","errorMsg":"手机号码格式错误"}
    public class SmsSend253Result
    {
        /// <summary>
        /// 返回码。0:成功,非0都是:失败
        /// </summary>
        [JsonProperty("code")]
        public string Code { get; set; }

        /// <summary>
        /// 错误消息内容
        /// </summary>
        
        public string ErrorMsg { get; set; }

        /// <summary>
        /// 时间戳
        /// </summary>
        
        public string time { get; set; }

        /// <summary>
        /// 是否请求成功
        /// </summary>
        /// <returns></returns>
        public bool IsSuccess()
        {
            return Code == "0";
        }
    }



}
